﻿namespace CRM.Business.Services
{
    using System.Collections.Generic;
    using CRM.DataAccess.DAOs;
    using CRM.DataAccess.Entities;
    using System;

    public static class TermsAndConditionsService
    {
        private static TermsAndConditionsDAO TermsAndConditionsDAO = new TermsAndConditionsDAO();

        //Get TAC Detail
        public static List<TERMS_AND_CONDITIONS> GetAllTAC()
        {
            return TermsAndConditionsDAO.GetAllTAC();
        }
        //Get TERMS_AND_CONDITIONS by ID
        public static TERMS_AND_CONDITIONS GetTACByID(long id)
        {
            return TermsAndConditionsDAO.GetTACByID(id);
        }
        //delete TERMS_AND_CONDITIONS
        public static int DeleteTAC(long id)
        {
            return TermsAndConditionsDAO.DeleteTAC(id);
        }
        //update TERMS_AND_CONDITIONS
        public static int UpdateTAC(TERMS_AND_CONDITIONS tac)
        {
            return TermsAndConditionsDAO.UpdateTAC(tac);
        }
        // get TERMS_AND_CONDITIONS by condition
        public static List<TERMS_AND_CONDITIONS> GetTACByCondition(DateTime? dateFrom, DateTime? dateTo, string TACName)
        {
            return TermsAndConditionsDAO.GetTACByCondition(dateFrom, dateTo, TACName);
        }
        // add new Description
        public static int AddNewTAC(TERMS_AND_CONDITIONS TAC)
        {
            return TermsAndConditionsDAO.AddNewTAC(TAC);
        }
        //Check exist
        public static int CheckExist(string TACName)
        {
            return TermsAndConditionsDAO.CheckExist(TACName);
        }

    }
}
